import axios from "axios"
//创建axios对象
const Server = axios.create({
    //地址
    baseURL:"",
    //超时时间
    timeout:3000,
});
//请求拦截器和响应拦截器
Server.interceptors.request.use(config => {
    
return config;
},error => {
return Promise.reject(error);
});
//响应拦截器
Server.interceptors.response.use(response => {
    //取出相应数据data的值
    if(response.status==200){
        return response.data;
    }
return response;
},error => {
return Promise.reject(error);
});
//抛出去
export default Server;